package com.codi.bus.core.sys.service.impl;

import com.codi.base.api.result.PageResult;
import com.codi.base.domain.BaseResult;
import com.codi.bus.core.sys.dao.FundOrganProfileDao;
import com.codi.bus.core.sys.domain.FundOrganProfile;
import com.codi.bus.core.sys.service.FundOrganProfileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

/**
 * Created by wangzhenhao on 2017/9/18.
 */
@Service
public class FundOrganProfileServiceImpl implements FundOrganProfileService{
    @Autowired
    private FundOrganProfileDao profileDao;

    @Override
    public BaseResult queryList(Pageable pageReq) {
        Page<FundOrganProfile> profiles = profileDao.query(pageReq);

        return new PageResult<>(profiles);
    }

    @Override
    public BaseResult search(Pageable pageReq, String content) {
        Page<FundOrganProfile> profiles = profileDao.search(pageReq, content);

        return new PageResult<>(profiles);
    }
}
